//
//  TLViewHUD.m
//  FunnyVideo
//
//  Created by 李鑫 on 15/9/3.
//  Copyright © 2015年 NewEggTech. All rights reserved.
//


#define HUDHEIGHT 60
#define HUDWIDTH  40

#define ImageNoNet      @"TLViewHUDNoNet"
#define ImageDataErr    @"TLViewHUDDataErr"
#define ImageServerErr  @"TLViewHUDServerErr"

#import "TLViewHUD.h"

@interface TLViewHUD ()
@property (nonatomic,strong)  TLViewHUDClickBlock block;
@property (nonatomic,strong)  UIImageView         *backImage;
@end
@implementation TLViewHUD


- (id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    
    if(self)
    {
        self.backImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:ImageNoNet]];
    }
    
    return self;
}


+ (TLViewHUD *)sharedHUD{
    static dispatch_once_t onceToken;
    static TLViewHUD    *HUD;
    dispatch_once(&onceToken, ^{
        HUD = [[TLViewHUD alloc] initWithFrame:CGRectMake(0, 0, HUDWIDTH, HUDHEIGHT)];
    });
    
    return HUD;
}


+ (void)showIn:(UIView *)view type:(TLErrorType)errorType{
    
}

+ (void)showIn:(UIView *)view type:(TLErrorType)errorType tapBlock:(TLViewHUDClickBlock)block{
    //block point
    [self sharedHUD].block = block;
}

+ (void)dismiss{
    
}

@end
